<?php

class Admin_DeveloperController extends Zend_Controller_Action
{

    public function init()
    {
        $options = array(
                'layout' => 'layout',
                'layoutPath' => LAYOUT_PATH . "/admincp"
        );
        Zend_Layout::startMvc($options);
    }

    public function indexAction()
    {
        // action body
    }

    public function addAction()
    {
        $this->view->page_header = "Thêm nhà phát triển";
        $func = new NVL_Functions();
        if($this->getRequest()->getPost()){
            $_post = $this->getRequest()->getPost();
            $mDev = new Application_Model_Devinfo();
            $mDev->dev_name = $_post['name-dev'];
            $mDev->dev_id = $func->ChangeToNoSpace($mDev->dev_name);
            $mDev->dev_address = $_post['address-dev'];
            $mDev->dev_country_id = $_post['country-dev'];
            $mDev->dev_type = $_post['type-dev'];
            $mDev->insertNew();
            //var_dump($_post);
        }
    }


}



